//
//  BleSleepDataModel.h
//  HBSDKPro
//
//  Created by LRB_C on 2020/8/19.
//  Copyright © 2020 林瑞彬. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 仅用于结果显示 不用下面BleSleepDataModel是因为BleSleepDataModel的数据都是从0点开始
 此模型的计算的睡眠数据从前一天晚上八点开始
 */
@interface BleSleepViewModel : NSObject

@property ( nonatomic, strong) NSNumber *wake;//清醒时长
@property ( nonatomic, strong) NSNumber *bad; //浅睡眠时间
@property ( nonatomic, strong) NSNumber *good;//深度睡眠
@property ( nonatomic, strong) NSDictionary *hourSleepRollCoutDict;//每个小时的翻滚数据
@property (nonatomic,strong) NSDate *date;// 传入的查询的date参数
@end

//睡眠翻身次数模型
@interface BleSleepRollCountDetailModel : NSObject

@property (nullable, nonatomic, retain) NSNumber *start; //开始时间 统计睡眠的时间有时默认从前一天晚上开始 所以记录start 便于统计睡眠翻滚次数和时长
@property (nullable, nonatomic, retain) NSNumber *count;//次数
@property (nullable, nonatomic, retain) NSNumber *hour;//小时
-(instancetype)initWithStartSleepSecond:(NSInteger)startSecond countInHour:(NSInteger)countInhour hour:(NSInteger)hour;

@end


@interface BleSleepDataModel : NSObject

@property (nonatomic, strong) NSNumber *start;//睡眠开始 统计睡眠的时间有时默认从前一天晚上开始 所以记录start 便于统计睡眠翻滚次数和时长
@property (nonatomic, strong) NSNumber *end;//睡眠结束
@property ( nonatomic, strong) NSNumber *wake;//清醒时长
@property ( nonatomic, strong) NSNumber *bad; //浅睡眠时间
@property ( nonatomic, strong) NSString *date;//日期
@property ( nonatomic, strong) NSNumber *good;//深度睡眠

@property (nonatomic,strong) NSArray <BleSleepRollCountDetailModel*>*hourRollCountArr;
//构造方法 解析蓝牙睡眠数据
-(instancetype)initWithData:(NSData*)data;

@end

